<template>
  <div class="app-main-container">
    <el-breadcrumb separator-class="el-icon-arrow-right">
      <el-breadcrumb-item
        :to="{ path: '/application/applicationCenter' }"
        :replace="true"
      >{{ translate("application") }}</el-breadcrumb-item>
      <el-breadcrumb-item>{{ translate("fxyqhy") }}</el-breadcrumb-item>
    </el-breadcrumb>
    <el-tabs v-model="activeTab" class="mt20">
      <el-tab-pane
        :label="translate('fxrwdd')"
        name="0"
      ><TaskOrder
        v-if="activeTab === '0'"
        :meta="meta"
      /></el-tab-pane>
      <el-tab-pane
        :label="translate('rwgl')"
        name="1"
      ><TaskAdmin
        v-if="activeTab === '1'"
        ref="taskAdminRef"
        :meta="meta"
      /></el-tab-pane>
      <el-tab-pane
        :label="translate('xgsz')"
        name="2"
      ><Set
        v-if="activeTab === '2'"
        :meta="meta"
      /></el-tab-pane>
    </el-tabs>
  </div>
</template>

<script>
import TaskOrder from './taskOrder'
import TaskAdmin from './taskAdmin'
import Set from './set'
export default {
  name: 'ShareModule',
  components: {
    TaskOrder,
    TaskAdmin,
    Set
  },
  data() {
    return {
      activeTab: '0',
      meta: []
    }
  },
  created() {
    this.meta = this.$route.meta.buttons || []
    if (this.$route.query.activeTab) {
      this.activeTab = this.$route.query.activeTab
    }
  },
  activated() {
    if (this.$route.query.refresh) {
      this.$refs.taskAdminRef.handleQuery()
    }
    if (this.$route.query.activeTab) {
      this.activeTab = this.$route.query.activeTab
    }
  },
  methods: {

  }

}
</script>

<style lang="scss" scoped>
</style>
